import {BrowserRouter as Router, Routes , Route, Link } from 'react-router-dom';
import Home from './sym/Home';
import About from './sym/About';
import Contact from './sym/Contact';
function App () {
    return(
        <Router>
        <div>
            <nav>
                <ul>
                    <li>
                        <Link to ="/">首页</Link>
                     </li>
                     <li>
                        <Link to="/About"  >关于</Link>
                    </li>
                     <li>
                        <Link to="/Contact">联系我们</Link>
                    </li>
                </ul>
            </nav>
        
        <Routes>
            <Route path = "/" element = {<Home />} />
            <Route path = "/About" element = {<About />} />
            <Route path = "/Contact" element = {<Contact/>} />
        </Routes>
        </div>
        </Router>
    );
}
export default App ;